package datatype;

/**
 * @author DuJiabao
 * @create 2020-12-28 22:38
 */
public class Node <Item>{
    private Item item;
    private Node<Item> next;

    public Node() {
    }

    public Node(Item item, Node<Item> next) {
        this.item = item;
        this.next = next;
    }

    public Item getItem() {
        return item;
    }

    public void setItem(Item item) {
        this.item = item;
    }

    public Node<Item> getNext() {
        return next;
    }

    public void setNext(Node<Item> next) {
        this.next = next;
    }

    @Override
    public String toString() {
        return "Node{" +
                "item=" + item +
                ", next=" + next +
                '}';
    }

//    @Override
//    public int compareTo(Object o) {
//        return item.compareTo(o);
//    }
}
